﻿<UserControl
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:controls="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls" 
    xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity" 
    xmlns:TheOliver_Controls="clr-namespace:TheOliver.Controls;assembly=TheOliver.Controls.Behaviors" xmlns:TheOliver_Controls_ApplicationFeatures="clr-namespace:TheOliver.Controls.ApplicationFeatures;assembly=TheOliver.Controls.Behaviors"
    xmlns:local="clr-namespace:TheOliver.Controls.SampleApp.Samples.Behaviors"
    mc:Ignorable="d"
    x:Class="TheOliver.Controls.SampleApp.Samples.Behaviors.BehaviorsSample"
    d:DesignHeight="300" d:DesignWidth="400">

    <Grid x:Name="LayoutRoot" Background="White">

        <controls:TabControl>
            <controls:TabItem x:Name="_deepZoomBehavior" Header="TabItem" d:LayoutOverrides="Width, Height">
            	<Grid Background="#FFE5E5E5">
            		<local:DeepZoomBehaviors d:LayoutOverrides="Width, Height"/>
            	</Grid>
            </controls:TabItem>
            <controls:TabItem x:Name="_dragBehavior" Header="DragBehavior">
                <Grid>
                    <Rectangle Fill="Red" HorizontalAlignment="Left" Margin="49,70,0,93" Stroke="Black" Width="100">
                        <i:Interaction.Behaviors>
                        	<TheOliver_Controls:DragBehavior/>
                        </i:Interaction.Behaviors>
                    </Rectangle>
                    <Rectangle Fill="Red" HorizontalAlignment="Right" Margin="0,70,80,93" Stroke="Black" Width="100">
                        <i:Interaction.Behaviors>
                        	<TheOliver_Controls:DragBehavior/>
                        </i:Interaction.Behaviors>
                    </Rectangle>
                </Grid>
            </controls:TabItem>
            <controls:TabItem x:Name="_printBehavior" Header="PrintBehavior">
            	<Grid>
            		<Grid.ColumnDefinitions>
            			<ColumnDefinition Width="0.487*"/>
            			<ColumnDefinition Width="0.513*"/>
            		</Grid.ColumnDefinitions>
            		<Image x:Name="image" Margin="8,8,8,130" Source="/TheOliver.Controls.SampleApp;component/Assets/20070815_132418.jpg" d:LayoutOverrides="HorizontalAlignment, VerticalAlignment"/>
            		<Button Content="Print" Grid.Column="1" Height="40" Margin="22,8,8,0" VerticalAlignment="Top" HorizontalAlignment="Right">
            			<i:Interaction.Triggers>
            				<i:EventTrigger EventName="Click">
            					<TheOliver_Controls_ApplicationFeatures:PrintBehavior TargetObject="{Binding ElementName=image}"/>
            				</i:EventTrigger>
            			</i:Interaction.Triggers>
            		</Button>
            	</Grid>
            </controls:TabItem>
        </controls:TabControl>

    </Grid>
</UserControl>
